1. Field
The following description relates to a logging technology for system recovery.
2. Description of the Related Art
In a general disk-based database, a disk input/output (I/O) occurs when a data read is performed on a particular page or a buffer replacement for data write or a transaction commit occurs. Such a disk I/O operation may cause the processing speed of a system to be slowed.
Meanwhile, logging is a representative technology for recovering data stored in a database. According to the logging technology, when any change occurs to data, contents before and after the change are stored in order for logs to be kept. Physically, a log is a file of updates done to the database, stored in non-volatile storage. If the database is found to be in an inconsistent state or was not previously properly shut down, the database logs can be reviewed for uncommitted transactions changes made by these transactions can be undone. Additionally, transactions that are already committed but for which changes did not yet appear in the database are redone.
However, in the logging technology, all logs generated in response to a data page being written to a disk or a transaction being committed need to stored in the disk, so frequent disk input/output (I/O) may be caused. In order to reduce the number of such a frequent disk I/O, a log buffer for storing log may be used.
By using the log buffer, logs are not directly written to the disk, but are written to the log buffer, so operations by disk I/O may be reduced. However even if the log buffer is used, the log buffer has a limited storage space, and, as such, the logs need to be periodically stored to the disk. That is, disk I/O generated when reflecting the logs stored in the log buffer to the disk also causes the logging performance to be lowered.